﻿@model ErrorModel;
@using NewLife.Cube.ViewModels;
@using Microsoft.AspNetCore.Mvc.Filters
@{
    //Layout = "_Ace_Layout.cshtml";
    Layout = "_Layout.cshtml";
    //Layout = NewLife.Cube.Setting.Current.Layout;
    ViewBag.Title = "处理你的请求时出错";

    var error = "没有捕捉到异常信息";

    var ex = Model?.Exception;
    if (ex != null)
    {
        if (NewLife.Cube.Setting.Current.Debug)
        {
            error = ex + "";
        }
        else
        {
            error = "内部错误：" + ex.GetTrue().GetType().FullName;
        }
        error = error?.Replace("--->", "--->" + Environment.NewLine);
    }
}
<div class="panel panel-default">
    <div class="panel-body">
        <strong>
            <pre class="alert info">RequestId: @Model?.RequestId</pre>
        </strong>
        <strong>
            <pre class="alert info">Uri: @Model?.Uri</pre>
        </strong>
        <strong>
            <pre class="alert alert-danger" role="alert">@error</pre>
        </strong>
    </div>
    <div class="panel-footer">
        <a href="javascript: history.go(-1);" class="btn btn-info">返回上一页</a>
    </div>
</div>